package com.example.svnkit_high_api.controller;

import com.example.svnkit_high_api.service.SVNHighService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.util.Map;

/**
 * 发布svn api上传文件
 */
@RestController
public class SVNHighController {

    @Autowired
    SVNHighService service;

    /**
     *
     * @param multipartFile
     * @return
     */
    @RequestMapping("/upload")
    public Map fileUpstreamSVN(@RequestBody MultipartFile multipartFile){
        Map map = service.upstreamSVN("", multipartFile.toString());
        return map;
    }
}
